'''
Created on Nov 27, 2012

@author: ConorMcEvoy
'''
from google.appengine.api import rdbms

_INSTANCE_NAME = 'dublin-nightsdb:instance1'

class eventbuilder:
    
    
    def __init__(self):
        return 0
    
    def get_event(self, user, query):
        '''here the code will query the DB or create a DB query statement'''
        conn = rdbms.connect(instance = _INSTANCE_NAME, database = 'mysql')
        
        cursor = conn.cursor()
        cursor.execute('SELECT Name from clubs')
        for row in cursor.fetchall():
            coppers = row[0]
        return coppers
    
    def get(self,user,query):
        
        'method to return values that can be easily attached to response headers'
        events = self.get_event(user,query);
        
        event_values = {
            'events': events,
            'user': user,
            
        }
        return event_values
    

      
        
    